package demo04;

public class Main {
    public static void main(String[] args) {
        UsbImpl usb = new UsbImpl();
        usb.show();
        System.out.println("======================");

        Usb usb1 = new UsbImpl();
        usb1.show();
        System.out.println("======================");

        Usb usb2 = new Usb() {
            public void show() {
                System.out.println("Usb匿名内部类方法");
            }
        };
        usb2.show();
        System.out.println("======================");
        showUsb(usb2);
        System.out.println("======================");
    }

    public static void showUsb(Usb usb){
        usb.show();
    }
}
